// 用户登录接口
function login(suserId, spassword) {
    $.post('http://39.98.42.158/manage/userLogin', { userId: suserId, password: spassword }, function(data, textStatus, xhr) {
        if (textStatus == 'success') {
			//{delete by wuguofang 20181205 for 修改为登录失败的情况下再弹出消息 begin
            //alert(data.message);
			//delete by wuguofang 20181205 for 修改为登录失败的情况下再弹出消息 begin}
            if (data.code == 200) {
                // 页面跳转
                var roleName = data.data.userInfo.roleName;
                if (roleName == '系统管理员') {
                    window.location.href = './userCenter.html';
                }
                if (roleName == '省生态环境保护委员会') {
                    window.location.href = './index.html';
                }
                if (roleName == '省牵头考核单位') {
                    window.location.href = './assess-department.html';
                }
                if (roleName == '市委市政府被考核单位') {
                    window.location.href = './assessed.html';
                }
            } else {
				//{add by wuguofang 20181205 for 修改为登录失败的情况下再弹出消息 begin
				alert(data.message);
				//add by wuguofang 20181205 for 修改为登录失败的情况下再弹出消息 begin}
                return false;
            }
        } else {
            return false;
        }
    }, 'json');
}